package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:34 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductVersionStageBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductVersionStage productVersionStage;

  protected BeanMap getBeanMap() {

    return new BeanMap(productVersionStage);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductVersionStageDAO.Id);

    mappedDaoFields.put(
        "productVersionId",
        com.ourteam.product.requirement.dao.IProductVersionStageDAO.ProductVersionId);

    mappedDaoFields.put(
        "stageName", com.ourteam.product.requirement.dao.IProductVersionStageDAO.StageName);

    mappedDaoFields.put(
        "startDate", com.ourteam.product.requirement.dao.IProductVersionStageDAO.StartDate);

    mappedDaoFields.put(
        "endDate", com.ourteam.product.requirement.dao.IProductVersionStageDAO.EndDate);

    mappedDaoFields.put(
        "actualStartDate",
        com.ourteam.product.requirement.dao.IProductVersionStageDAO.ActualStartDate);

    mappedDaoFields.put(
        "actualEndDate", com.ourteam.product.requirement.dao.IProductVersionStageDAO.ActualEndDate);

    mappedDaoFields.put(
        "sortIndex", com.ourteam.product.requirement.dao.IProductVersionStageDAO.SortIndex);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductVersionStageDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductVersionStageDAO.Remarks);

    mappedDaoFields.put(
        "productVersionName",
        com.ourteam.product.requirement.dao.IProductVersionStageDAO.ProductVersionName);

    mappedDaoFields.put(
        "productVersionStartDate",
        com.ourteam.product.requirement.dao.IProductVersionStageDAO.ProductVersionStartDate);

    mappedDaoFields.put(
        "productVersionEndDate",
        com.ourteam.product.requirement.dao.IProductVersionStageDAO.ProductVersionEndDate);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductVersionStageBean() {
    super();

    this.productVersionStage = new com.ourteam.product.requirement.dao.ProductVersionStage();
  }

  public ProductVersionStageBean(
      com.ourteam.product.requirement.dao.ProductVersionStage productVersionStage) {
    super();

    this.productVersionStage = productVersionStage;
  }

  public com.ourteam.product.requirement.dao.ProductVersionStage convertToProductVersionStage() {
    return this.productVersionStage;
  }

  public com.ourteam.product.requirement.dao.ProductVersionStage convertTo() {
    return this.productVersionStage;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productVersionStage.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productVersionStage.setId(id);
  }

  /**
   * Get productVersionId
   *
   * @return long
   */
  public long getProductVersionId() {
    return (long) this.productVersionStage.getProductVersionId();
  }

  /**
   * Set productVersionId
   *
   * @parameter long
   */
  public void setProductVersionId(long productVersionId) {

    this.productVersionStage.setProductVersionId(productVersionId);
  }

  /**
   * Get stageName
   *
   * @return String
   */
  public String getStageName() {
    return (String) this.productVersionStage.getStageName();
  }

  /**
   * Set stageName
   *
   * @parameter String
   */
  public void setStageName(String stageName) {

    this.productVersionStage.setStageName(stageName);
  }

  /**
   * Get startDate
   *
   * @return java.util.Date
   */
  public java.util.Date getStartDate() {
    return (java.util.Date) this.productVersionStage.getStartDate();
  }

  /**
   * Set startDate
   *
   * @parameter java.util.Date
   */
  public void setStartDate(java.util.Date startDate) {

    this.productVersionStage.setStartDate(startDate);
  }

  /**
   * Get endDate
   *
   * @return java.util.Date
   */
  public java.util.Date getEndDate() {
    return (java.util.Date) this.productVersionStage.getEndDate();
  }

  /**
   * Set endDate
   *
   * @parameter java.util.Date
   */
  public void setEndDate(java.util.Date endDate) {

    this.productVersionStage.setEndDate(endDate);
  }

  /**
   * Get actualStartDate
   *
   * @return java.util.Date
   */
  public java.util.Date getActualStartDate() {
    return (java.util.Date) this.productVersionStage.getActualStartDate();
  }

  /**
   * Set actualStartDate
   *
   * @parameter java.util.Date
   */
  public void setActualStartDate(java.util.Date actualStartDate) {

    this.productVersionStage.setActualStartDate(actualStartDate);
  }

  /**
   * Get actualEndDate
   *
   * @return java.util.Date
   */
  public java.util.Date getActualEndDate() {
    return (java.util.Date) this.productVersionStage.getActualEndDate();
  }

  /**
   * Set actualEndDate
   *
   * @parameter java.util.Date
   */
  public void setActualEndDate(java.util.Date actualEndDate) {

    this.productVersionStage.setActualEndDate(actualEndDate);
  }

  /**
   * Get sortIndex
   *
   * @return int
   */
  public int getSortIndex() {
    return (int) this.productVersionStage.getSortIndex();
  }

  /**
   * Set sortIndex
   *
   * @parameter int
   */
  public void setSortIndex(int sortIndex) {

    this.productVersionStage.setSortIndex(sortIndex);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productVersionStage.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productVersionStage.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productVersionStage.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productVersionStage.setRemarks(remarks);
  }

  /**
   * Get productVersionName
   *
   * @return String
   */
  public String getProductVersionName() {

    return (String) this.productVersionStage.getProductVersionName();
  }

  /**
   * Get productVersionStartDate
   *
   * @return java.util.Date
   */
  public java.util.Date getProductVersionStartDate() {

    return (java.util.Date) this.productVersionStage.getProductVersionStartDate();
  }

  /**
   * Get productVersionEndDate
   *
   * @return java.util.Date
   */
  public java.util.Date getProductVersionEndDate() {

    return (java.util.Date) this.productVersionStage.getProductVersionEndDate();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductVersionStageBean) == false) {
      return false;
    } // end if

    ProductVersionStageBean other = (ProductVersionStageBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductVersionStage tempProductVersionStage =
        other.convertToProductVersionStage();

    if (tempProductVersionStage == null || this.productVersionStage == null) {
      isEqual = false;
    } else if (tempProductVersionStage == this.productVersionStage
        || tempProductVersionStage.equals(this.productVersionStage)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductVersionStageBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersionStage[] aProductVersionStages) {

    return toArray(aProductVersionStages, null);
  }

  public static ProductVersionStageBean[] toArray(
      com.ourteam.product.requirement.dao.ProductVersionStage[] aProductVersionStages,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductVersionStages)) {
      return new ProductVersionStageBean[0];
    }

    int length = aProductVersionStages.length;

    ProductVersionStageBean[] beans = new ProductVersionStageBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductVersionStageBean(aProductVersionStages[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductVersionStages[i]});
      }
    }

    return beans;
  }
}
